home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Celestin Apprentice 4
/
Apprentice-Release4.iso
/
Languages
/
Caml Light 0.7
/
Caml Light 0.7 source
/
src
/
From Franklin Chen
/
linker
/
Makefile
Wrap
Makefile
|
1995-06-14
|
2KB
|
79 lines
# Makefile for the Caml Light linker.
CAMLCOMP=::camlrun ::camlcomp
CAMLLINK=::camlrun ::camllink
INCLUDES=-stdlib ::lib -I ::compiler
COMPFLAGS=-O fast {INCLUDES}
LINKFLAGS=-g {INCLUDES}
EXTERNOBJS=config.zo misc.zo opcodes.zo
OBJS=predef.zo prim_c.zo symtable.zo patch.zo tr_const.zo link.zo ∂
readword.zo version.zo main.zo
all ƒ camllink
camllink ƒ {OBJS}
{CAMLLINK} {LINKFLAGS} -o camllink stdlib.zo {EXTERNOBJS} {OBJS}
clean ƒ
Delete -i ≈.z[io] || ;
Delete -i camllink
scratch ƒ clean
Delete -i predef.ml prim_c.ml
Delete -i Makefile.BAK
install ƒ
Duplicate -y camllink "{LIBDIR}camllink"
prim_c.ml ƒ ::runtime:primitives
Duplicate -y ::runtime:primitives prim_c.ml
Open prim_c.ml; Find • prim_c.ml
Replace -c ∞ /(?≈)®1/ ' "®1";' prim_c.ml
Replace \;\ '|];;' prim_c.ml
Find • prim_c.ml
Echo 'let primitives_table = [|' >prim_c.ml.§
Close -y prim_c.ml
predef.ml ƒ ::runtime:globals.h ::runtime:fail.h
Echo '#open "const";;'∂n'let predef_variables = [' >predef.ml
Open predef.ml;
Search -q /'/* "'≈'","'≈'" */'/ ::runtime:globals.h >>predef.ml
Find • predef.ml
Replace -c ∞ /≈'/* "'(≈)®1'","'(≈)®2'" */'/ '{qual="®1"; id="®2"};' predef.ml
Clear \;\ predef.ml
Echo '];;'∂n'let predef_exn = [' >>predef.ml
Search -q /'/* "'≈'","'≈'",'[0-9]+' */'/ ::runtime:fail.h >>predef.ml
Find • predef.ml
Replace -c ∞ /≈'/* "'(≈)®1'","'(≈)®2'",'([0-9]+)®3' */'/ '({qual="®1"; id="®2"}, ®3);' predef.ml
Clear \;\ predef.ml
Echo '];;' >>predef.ml
Close -y predef.ml
.zi ƒ .mli
{CAMLCOMP} {COMPFLAGS} {Default}.mli
.zo ƒ .ml
{CAMLCOMP} {COMPFLAGS} {Default}.ml
depend ƒ prim_c.ml predef.ml
Move -y Makefile Makefile.bak
# FMC also possible instead of sed.
# Streamedit -d -e '1,/ç•### DO NOT DELETE THIS LINE/ Print .'
(sed -n -e '1,/^### DO NOT DELETE THIS LINE/p' Makefile.bak; ∂
::tools:camldep -I ::compiler: ≈.ml) > Makefile
Delete Makefile.bak
### EVERYTHING THAT GOES BEYOND THIS COMMENT IS GENERATED
### DO NOT DELETE THIS LINE
link.zo ƒ ::compiler:reloc.zo tr_const.zo ::compiler:config.zi ∂
::compiler:const.zo ::compiler:emit_phr.zo ::compiler:misc.zi ∂
symtable.zo patch.zo ::compiler:instruct.zo ::compiler:opcodes.zo
main.zo ƒ link.zo ::compiler:config.zi ::compiler:misc.zi version.zo ∂
symtable.zo readword.zo
patch.zo ƒ symtable.zo ::compiler:reloc.zo
predef.zo ƒ ::compiler:const.zo
symtable.zo ƒ predef.zo ::compiler:misc.zi prim_c.zo ::compiler:const.zo
tr_const.zo ƒ symtable.zo ::compiler:const.zo